/**
 * Created by dean on 2018/5/25.
 */
import { fetch, post } from '../util/http'

//转正类型
export const getPrcType = params => { return fetch(`/api/hr/sysdict/getPrcType`, params).then(res => res); };

//字典信息
export const getDicItem = params => { return fetch(`/api/hr/sysdict/getAll`, params).then(res => res); };

//调整岗位列表
export const getJobDicItem = params => { return fetch(`/api/hr/sysdict/getJoblist`, params).then(res => res); };

//录入入公司前工作经历信息
export const saveWork = params => { return post(`/api/hr/hireExpWork/save`, params).then(res => res); };
//删除入公司前工作经历信息
export const delWork = params => { return post(`/api/hr/hireExpWork/del`, params).then(res => res); };

//录入教育信息
export const saveEducation = params => { return post(`/api/hr/hireEducat/save`, params).then(res => res); };
//删除教育信息
export const delEducation = params => { return post(`/api/hr/hireEducat/del`, params).then(res => res); };

//录入培训经历
export const saveTraining = params => { return post(`/api/hr/hireTrain/save`, params).then(res => res); };
//删除培训经历
export const delTraining = params => { return post(`/api/hr/hireTrain/del`, params).then(res => res); };

//录入资格证书
export const saveQualification = params => { return post(`/api/hr/hireZcgl/save`, params).then(res => res); };
//删除资格证书
export const delQualification = params => { return post(`/api/hr/hireZcgl/del`, params).then(res => res); };

//录入语言能力
export const saveLan = params => { return post(`/api/hr/hireLan/save`, params).then(res => res); };
//删除语言能力
export const delLan = params => { return post(`/api/hr/hireLan/del`, params).then(res => res); };

//录入计算机能力
export const saveComputer = params => { return post(`/api/hr/hireItTech/save`, params).then(res => res); };
//删除计算机能力
export const delComputer = params => { return post(`/api/hr/hireItTech/del`, params).then(res => res); };

//录入奖惩类别
export const saveRewards = params => { return post(`/api/hr/hireJcxx/save`, params).then(res => res); };
//删除奖惩类别
export const delRewards = params => { return post(`/api/hr/hireJcxx/del`, params).then(res => res); };

//获取用户基本信息
export const getBasicInfo = params => { return fetch(`/api/hr/personalData/getBaseInfo`,params).then(res => res); };

//录入家庭情况
export const saveFamily = params => { return post(`/api/hr/hireFamily/save`, params).then(res => res); };
//删除家庭情况
export const delFamily = params => { return post(`/api/hr/hireFamily/del`, params).then(res => res); };

//我的下属页面获取用户基本信息
export const getSubBasicInfo = params => { return fetch(`/api/hr/jobCurr/getOne`,params).then(res => res); };

//我的下属页面获取下属信息
export const getMySubBasicInfo = params => { return fetch(`/api/hr/jobCurr/getUnderLine`,params).then(res => res); };

//获取教育经历
export const getEdu = params => { return fetch(`/api/hr/hireEducat/getAll`, params).then(res => res); };

//获取工作经历
export const getExwork = params => { return fetch(`/api/hr/hireExpWork/getAll`, params).then(res => res); };

//获取培训经历
export const getTrain = params => { return fetch(`/api/hr/hireTrain/getAll`, params).then(res => res); };

//获取语言能力
export const getLan = params => { return fetch(`/api/hr/hireLan/getAll`, params).then(res => res); };

//获取计算机能力
export const getPcAb = params => { return fetch(`/api/hr/hireItTech/getAll`, params).then(res => res); };

//获取奖惩情况
export const getjc = params => { return fetch(`/api/hr/hireJcxx/getAll`, params).then(res => res); };

//获取家庭情况
export const getFam = params => { return fetch(`/api/hr/hireFamily/getAll`, params).then(res => res); };

//获取紧急联系人
export const getTacp = params => { return fetch(`/api/hr/hireTactPer/getOne`, params).then(res => res); };

//银行账号信息
export const getBnkacc = params => { return fetch(`/api/hr/hireBankacct/getOne`, params).then(res => res); };

//资格证书
export const getzgzs = params => { return fetch(`/api/hr/hireZcgl/getAll`, params).then(res => res); };

//社保公积金
export const getsbg = params => { return fetch(`/api/hr/hireSi/getAll`, params).then(res => res); };

//保存基本信息
export const saveBsinfo = params => { return post(`/api/hr/hirePerson/save`, params).then(res => res); };

//查询国家
export const getCountry = () => { return fetch(`/api/hr/countryTbl/getAll`).then(res => res); };

//查询民族
export const getNation = () => { return fetch(`/api/hr/ethnicGrpTbl/getAll`).then(res => res); };

//查询证件类型
export const getIdType = () => { return fetch(`/api/hr/nidType1Vw/getAll`).then(res => res); };

//查询银行
export const getBank = () => { return fetch(`/api/hr/bankEcTbl/getAll`).then(res => res); };

//离职补偿金
export const getCompensate = params => { return fetch(`/api/hr/wfDmcHdr/getDmcInfo`, params).then(res => res); };

//离职补偿金审批流程图
export const getCompensateProcess = params => { return fetch(`/api/hr/process/processMap`, params).then(res => res); };

//离职补偿金审批(通用审批)
export const getCompensateApprove = params => { return post(`/api/hr/process/approve`, params).then(res => res); };

//保存紧急联系人
export const saveEmergent = params => { return post(`/api/hr/hireTactPer/save`, params).then(res => res); };

//保存银行
export const saveBank = params => { return post(`/api/hr/hireBankacct/save`, params).then(res => res); };

//转正审批
export const getFormal = params => { return fetch(`/api/hr/wfprchdr/getWfPrcHdr`, params).then(res => res); };

//转正流程审批
export const getFormalApprove = params => { return post(`/api/hr/wfprchdr/savePrc`, params).then(res => res); };

//离职审批
export const getWastage = params => { return fetch(`/api/hr/wfterhdr/getWfTerHdr`, params).then(res => res); };

//离职流程审批
export const getWastageApprove = params => { return post(`/api/hr/wfterhdr/saveTer`, params).then(res => res); };

//离职原因字典
export const getWastageReason = params => { return fetch(`/api/hr/sysdict/getActionResons`, params).then(res => res); };

//离职详细原因字典
export const getWastageDetailReason = params => { return fetch(`/api/hr/sysdict/getTerDetail`, params).then(res => res); };

//扫码信息获取
export const getQrmsg = params => { return fetch(`/api/hr/hirePerson/getOne`, params).then(res => res); };

//保存社保信息
export const saveSocial = params => { return post(`/api/hr/hireSi/save`, params).then(res => res); };

//解除劳动合同审批
export const getDissolution = params => { return fetch(`/api/hr/wfTlcHdr/getTlcInfo`, params).then(res => res); };

//工作调动审批
export const getMobilization = params => { return fetch(`/api/hr/wfXfrHdr/getXfrInfo`, params).then(res => res); };

//工作移交审批
export const getHandover = params => { return fetch(`/api/hr/wfTolHdr/getTolInfo`, params).then(res => res); };

//待办事项列表(待审批)
export const getTodoList = params => { return fetch(`/api/hr/process/getTODOlist`, params).then(res => res); };

//待办事项列表(已审批)
export const getDoneList = params => { return fetch(`/api/hr/process/getApprovedlist`, params).then(res => res); };

//我的申请列表
export const getMyApplication = params => { return fetch(`/api/hr/process/getMyApply`, params).then(res => res); };

//加签人员列表
export const getVisa = params => { return fetch(`/api/hr/wfPersonVw/getAll`, params).then(res => res); };

//个人信息修改审批
export const getProcessPerson = params => { return fetch(`/api/hr/modPers/getProcessPerson`, params).then(res => res); };

//获取流水号
export const getTrsNum = () => { return fetch(`/api/hr/process/getTransNum`).then(res => res); };

//获取个人基本信息
export const getBasicUser = params => { return fetch(`/api/hr/personalData/getOne`,params).then(res => res); };

//修改个人基本信息
export const saveBasicUser = params => { return post(`/api/hr/modPers/save`,params).then(res => res); };

//获取个人工作经历
export const getPWork = params => { return fetch(`/api/hr/workhis/getAll`, params).then(res => res); };

//修改个人工作经历
export const savePWork = params => { return post(`/api/hr/modWorkHi/save`,params).then(res => res); };

//获取个人教育经历
export const getPEdu = params => { return fetch(`/api/hr/educatTbl/getAll`, params).then(res => res); };

//修改个人教育经历
export const savePEdu = params => { return post(`/api/hr/modEducat/save`,params).then(res => res); };

//获取个人培训经历
export const getPTrain = params => { return fetch(`/api/hr/trainTbl/getAll`, params).then(res => res); };

//修改个人培训经历
export const savePTra = params => { return post(`/api/hr/modTrain/save`,params).then(res => res); };

//获取个人资格证书
export const getPzcgl = params => { return fetch(`/api/hr/zcglTbl/getAll`, params).then(res => res); };

//修改个人资格证书
export const editpqual = params => { return post(`/api/hr/modZcgl/save`, params).then(res => res); };

//获取个人语言能力
export const getPlan = params => { return fetch(`/api/hr/empLangTbl/getAll`, params).then(res => res); };

//修改个人语言能力
export const savePLan = params => { return post(`/api/hr/modEmpLang/save`, params).then(res => res); };

//获取个人计算机
export const getPpc= params => { return fetch(`/api/hr/itTechTbl/getAll`, params).then(res => res); };

//修改个人计算机
export const savePpc = params => { return post(`/api/hr/modItTech/save`, params).then(res => res); };

//获取个人奖惩
export const getPjc= params => { return fetch(`/api/hr/jcxxTbl/getAll`, params).then(res => res); };

//修改个人奖惩
export const savePjc = params => { return post(`/api/hr/modJcxx/save`, params).then(res => res); };

//获取个人家庭
export const getPfam= params => { return fetch(`/api/hr/familyTbl/getAll`, params).then(res => res); };

//修改个人家庭
export const savePfam = params => { return post(`/api/hr/modFamily/save`, params).then(res => res); };

//获取个人紧急
export const getPtech= params => { return fetch(`/api/hr/tactPerTbl/getOne`, params).then(res => res); };

//修改个人紧急
export const savePtack = params => { return post(`/api/hr/modTactPer/save`, params).then(res => res); };

//获取个人银行
export const getPbnk= params => { return fetch(`/api/hr/pyeBankacct/getOne`, params).then(res => res); };

//修改个人银行
export const savePbnk = params => { return post(`/api/hr/modBankacct/save`, params).then(res => res); };

//获取个人社保
export const getPsoc= params => { return fetch(`/api/hr/socialTbl/getAll`, params).then(res => res); };

//修改个人社保
export const savePsoc = params => { return post(`/api/hr/modSocial/save`, params).then(res => res); };

//获取入职材料信息
export const getMaterial= params => { return fetch(`/api/hr/hireFileVw/getAll`, params).then(res => res); };

//获取待办事项数目
export const getTdListNum = () => { return fetch(`/api/hr/process/getTODONums`).then(res => res); };

//获取证明开具
export const getProve= params => { return fetch(`/api/hr/wfCerHdr/getOne`, params).then(res => res); };

//查询入公司后工作经历
export const getEmpAfter= params => { return fetch(`/api/hr/workhis/getNowWorkHis`, params).then(res => res); };

//我的申请撤单
export const cancelOrder = params => { return post(`/api/hr/process/apply`, params).then(res => res); };

//获取入职信息材料
export const getHirCai = params => { return fetch(`/api/hr/hireFile/getAll`, params).then(res => res); };

//上传文件删除
export const delHirCai = params => { return post(`/api/hr/hireFile/del`, params).then(res => res); };

//获取用户id
export const getEplid = () => { return fetch(`/api/hr/common/getUser`).then(res => res); };

//查看入职头像
export const gethead = params => { return fetch(`/api/hr/hirePhoto/getOne`, params).then(res => res); };

//上传入职头像
export const savehead = params => { return post(`/api/hr/hirePhoto/upload`, params).then(res => res); };

// 招聘录用审批
export const getRecruitmentInfo = params => { return fetch(`/api/hr/wfDrftHdr/getDrftInfo`, params).then(res => res); };

// 招聘录用审批提交
export const getRecruitmentApproveDrft = params => { return post(`/api/hr/wfDrftHdr/approveDrft`, params).then(res => res); };
